<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> 武汉同兴一站办企业服务有限公司 管理中心 - 添加文章 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/Public/Admin/Styles/general.css" rel="stylesheet" type="text/css" />
<link href="/Public/Admin/Styles/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>
    
    <span class="action-span"><a href="#">优惠券添加</a></span>
    <span class="action-span1"><a href="#">武汉同兴一站办企业服务有限公司 管理中心</a></span>
    <!--   <span id="search_id" class="action-span1"> - 添加分类 </span>-->
    <div style="clear:both"></div>

</h1>
<div class="main-div">
    

    <form action="<?php echo U('Couponentity/edit');?>" method="post" name="my_form" id="my_form" enctype="multipart/form-data">
        <table width="100%" id="general-table">
            <input type="hidden" value="<?php echo ($res["entity_coupon_id"]); ?>" name="entity_coupon_id">
            <tr>
                <td class="label">赞助商名称:</td>
                <td>
                    <input type='text' name='sponsor_id' maxlength="20" value='<?php echo ($res["sponsor_id"]); ?>' size='27' /> <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">优惠券名称:</td>
                <td>
                    <input type='text' name='coupon_name' maxlength="20" value='<?php echo ($res["coupon_name"]); ?>' size='27' /> <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">优惠券介绍:</td>
                <td>
                    <input type='text' name='intro' maxlength="20" value='<?php echo ($res["intro"]); ?>' size='27' /> <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">兑换所需积分:</td>
                <td>
                    <input type='text' name='integral' maxlength="20" value='<?php echo ($res["integral"]); ?>' size='27' /> <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">VIP所专属:</td>
                <td>
                    <select id="sel" name="vip_exclusive" style="width:150px">
                        <option value="0">普通优惠券</option>
                        <option value="1">VIP1以上可以兑换</option>
                        <option value="2">VIP2以上可以兑换</option>
                        <option value="3">VIP3以上可以兑换</option>
                        <option value="4">VIP4以上可以兑换</option>
                        <option value="5">VIP5以上可以兑换</option>
                        <option value="6">VIP6以上可以兑换</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="label">开始领取时间:</td>
                <td>
                    <input type="datetime-local" name="start_time" value="<?php echo ($res["start_time"]); ?>">
                </td>
            </tr>
            <tr>
                <td class="label">结束领取时间:</td>
                <td>
                    <input type="datetime-local" name="end_time" value="<?php echo ($res["end_time"]); ?>">
                </td>
            </tr>

            <tr>
                <td class="label">可以使用时间:</td>
                <td>
                    <input type='text' name='use_time' maxlength="20" value="<?php echo ($res["use_time"]); ?>" size='27'/>天 <font color="red">*</font>
                </td>
            </tr>

            <tr>
                <td class="label">失效类型:</td>
                <td>
                    <input type="radio" name="lost_type" value="0" onclick="hah()" <?php if($res["lost_type"] == 0): ?>checked<?php endif; ?> >定期失效
                    <input type="radio" name="lost_type" value="1" onclick="hah1()" <?php if($res["lost_type"] == 1): ?>checked<?php endif; ?>>周期性失效
                </td>
            </tr>
            <tr id="lost_time" >
                <td class="label" >定期失效时间:</td>
                <td>
                    <input type='datetime-local' name='lost_time' value="<?php echo ($res["lost_time"]); ?>"/>
                </td>
            </tr>
            <tr id="lost" >
                <td class="label"  >周期失效时间:</td>
                <td>
                    <input type='text' name='lost_cycle'  value="<?php echo ($res["lost_cycle"]); ?>"/>天
                </td>
            </tr>

            <tr>
                <td class="label">优惠券数量:</td>
                <td>
                    <input type='text' name='coupon_num' maxlength="20" value='<?php echo ($res["coupon_num"]); ?>' size='27' /> <font color="red">*</font>
                </td>
            </tr>
            <tr>
                <td class="label">优惠券状态:</td>
                <td>

                    <input type="radio" name="state" value="1" <?php if($res["state"] == 1): ?>checked<?php endif; ?>>启用
                    <input type="radio" name="state" value="0" <?php if($res["state"] == 0): ?>checked<?php endif; ?>>禁用
                </td>
            </tr>



        </table>
        <div class="button-div">
            <input type="submit" value=" 确定 " />
        </div>
    </form>

    <script>

        document.getElementById("sel")[<?php echo ($res["vip_exclusive"]); ?>].selected=true;
        if (<?php echo ($res["lost_type"]); ?>==0) {
        document.getElementById("lost").style.display='none';
        }else{
        document.getElementById("lost_time").style.display='none';
        }
        function hah() {
            document.getElementById("lost_time").style.display='';
            document.getElementById("lost").style.display='none';
        }
        function hah1() {
            document.getElementById("lost").style.display='';
            document.getElementById("lost_time").style.display='none';
        }


    </script>
    <script type="text/javascript" src="/public/Admin/JS/jquery.min.js"></script>
    <script type="text/javascript" src="/public/Admin/JS/mydate.js"></script>

</div>

<div id="footer">
共执行 3 个查询，用时 0.162348 秒，Gzip 已禁用，内存占用 2.266 MB<br />
版权所有 &copy; 2005-2012 武汉同兴一站办企业服务有限公司，并保留所有权利。</div>

</body>
</html>
<script type="text/javascript" src="/Public/Admin/JS/jquery-1.8.3.min.js"></script>